/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package mbean.mobile;

import javax.inject.Named;
import javax.enterprise.context.SessionScoped;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.ejb.EJB;
import model.entity.Customerdemand;
import model.entity.Task;
import service.ICustomerdemandManager;
import service.ITaskmanager;
import service.InterfaceServiceLocal;

/**
 *
 * @author dingnangen
 */
@Named(value = "mobileTaskMB")
@SessionScoped
public class MobileTaskMB implements Serializable {

    @EJB(beanName = "TaskManager")
    private ITaskmanager<Task> taskManager;

    @EJB(beanName="CustomerdemandManager")
    private ICustomerdemandManager<Customerdemand> customerdemandManager;
    /**
     * Creates a new instance of TaskMB
     */
    public MobileTaskMB() {
    }

    public Task getTask(String loginname, String date) {

        return taskManager.getTaskByLoginName(loginname, date);
    }

    public String customerdemandCommit(String cdid,String date) {
    return customerdemandManager.customerdemandCommit(cdid, date);
    }
}
